package com.hex.ds.hdrs.common.enums;

public enum CronTaskDefStatusEnum {

    UNPUBLISHED("0", "未发布"),
    ENABLE("1", "启用"),
    DISABLE("2", "停用");

    private String value;
    private String name;

    private CronTaskDefStatusEnum(String name, String value) {
        this.value = value;
        this.name = name;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static CronTaskDefStatusEnum fromJCronTaskDefStatusEnum(String name) {
        for (CronTaskDefStatusEnum type : CronTaskDefStatusEnum.values()) {
            if (type.getName().equals(name)) {
                return type;
            }
        }
        return null;
    }
}
